#pragma once
#include "Pch.h"
#include "Core.h"
#include <spdlog/spdlog.h>
namespace Engine
{
	class ENGINE_API Log
	{
	public:
		Log();
		~Log();
		static void Init();
		inline static std::shared_ptr<spdlog::logger>& GetEngineLogger() { return msEngineLogger; }
		inline static std::shared_ptr<spdlog::logger>& GetClientLogger() { return msClientLogger; }
	private:
		static std::shared_ptr<spdlog::logger> msClientLogger;
		static std::shared_ptr<spdlog::logger> msEngineLogger;
	};

}

// Engine logger
#define ENGINE_TRACE(...)         Engine::Log::GetEngineLogger()->trace(__VA_ARGS__)
#define ENGINE_INFO(...)          Engine::Log::GetEngineLogger()->info(__VA_ARGS__)
#define ENGINE_WARN(...)          Engine::Log::GetEngineLogger()->warn(__VA_ARGS__)
#define ENGINE_ERROR(...)         Engine::Log::GetEngineLogger()->error(__VA_ARGS__)
#define ENGINE_CRITICAL(...)      Engine::Log::GetEngineLogger()->critical(__VA_ARGS__)

// Client logger
#define Client_TRACE(...)         Engine::Log::GetClientLogger()->trace(__VA_ARGS__)
#define Client_INFO(...)          Engine::Log::GetClientLogger()->info(__VA_ARGS__)
#define Client_WARN(...)          Engine::Log::GetClientLogger()->warn(__VA_ARGS__)
#define Client_ERROR(...)         Engine::Log::GetClientLogger()->error(__VA_ARGS__)
#define Client_CRITICAL(...)      Engine::Log::GetClientLogger()->critical(__VA_ARGS__)

